import requests
from lxml import etree

headers = {
    "accept": "*/*",
    "accept-language": "zh-CN,zh;q=0.9",
    "priority": "u=1, i",
    "referer": "https://www.xinpianchang.com/discover/article-27-180-all-all-0-0-score-pp2",
    "sec-ch-ua": "\"Not)A;Brand\";v=\"8\", \"Chromium\";v=\"138\", \"Google Chrome\";v=\"138\"",
    "sec-ch-ua-mobile": "?0",
    "sec-ch-ua-platform": "\"Windows\"",
    "sec-fetch-dest": "empty",
    "sec-fetch-mode": "cors",
    "sec-fetch-site": "same-origin",
    "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36",
    "x-nextjs-data": "1"
}
cookies = {
    "FECWS": "254908952d7a40a2707ccf547c2a004bc463ed14b11fd159c0ce2f486899fc1eb02d5e923f62da308cb683a65cbc8d48386af54548ec1d7ddb0d54042bd755edfb66609c2963707921af066f3886b21441",
    "Device_ID": "34m0k1f3pvmdebzwmv",
    "Hm_lvt_446567e1546b322b726d54ed9b5ad346": "1753176459",
    "HMACCOUNT": "F88B9A85A017A738",
    "sajssdk_2015_cross_new_user": "1",
    "Authorization": "C96DB9545448684D254486419854486BCCB544862528A0544D98",
    "sensorsdata2015jssdkcross": "%7B%22distinct_id%22%3A%22198317607771ae1-0776b1b0a2f0e6-26011151-1821369-198317607781bdf%22%2C%22first_id%22%3A%22%22%2C%22props%22%3A%7B%22%24latest_traffic_source_type%22%3A%22%E7%9B%B4%E6%8E%A5%E6%B5%81%E9%87%8F%22%2C%22%24latest_search_keyword%22%3A%22%E6%9C%AA%E5%8F%96%E5%88%B0%E5%80%BC_%E7%9B%B4%E6%8E%A5%E6%89%93%E5%BC%80%22%2C%22%24latest_referrer%22%3A%22%22%7D%2C%22%24device_id%22%3A%22198317607771ae1-0776b1b0a2f0e6-26011151-1821369-198317607781bdf%22%7D",
    "Hm_lpvt_446567e1546b322b726d54ed9b5ad346": "1753187296",
    "FECAS": "1Dgt/iT9V+RlekvsotGkuhY8lGEhbl5IKwT1wIP9B/9EspBuH4TgpGKZp+x2ZsU/+a+rJxRBPnUwyC5KaOMqbBVgyDcZxMJv6YKMwABRbXVkZYduOdJt9dTPt3udijVtxt69c+6a0EAhxR9UuAFCK6Hx9YsYutnO7tiYEG1hLcL1Na2xkyDXHp0ndXpuMuwctd"
}
url = "https://www.xinpianchang.com/_next/data/vtz9Y_Hy44aZmR_i-7-mB/discover/article/27-180-all-all-0-0-score-pp3.json"
params = {
    "param": "27-180-all-all-0-0-score-pp2",
    "FECU": "1Dgt/iT9V+RlekvsotGkuhY8lGEhbl5IKwT1wIP9B/9EKE9l7L5pMqcMvNeybpAyp/r3qCMGhtpM7Wjpup3KLCf2+3yz6xvKwt9MJOKXKwZlJbFaOyvcndGd7sCCh4n0T7+00I411O9v5glGnCZXnv3XJEmNrPuyliz6cqlBSrZjnCk/qfpA78RQCvhf/HR9ud"
}
response = requests.get(url, headers=headers, cookies=cookies, params=params)

html_str = response.content.decode()


